unit PickingMain;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Soap.InvokeRegistry,
  Data.DB, Datasnap.DBClient, Soap.SOAPConn, Soap.Rio, Soap.SOAPHTTPClient,
  Vcl.ComCtrls, Vcl.ExtCtrls, OrdersViewFrame, OrderFrame, DataClasses;

type
  TMainForm = class(TForm)
	SalesRIO: THTTPRIO;
	InfoBox: TListBox;
	StatusBar1: TStatusBar;
	pnlInfoPanel: TPanel;
	btnLog: TButton;
	FOrdersView: TFOrdersView;
	FOrder: TFOrder;
    PageControl: TPageControl;
    OrdersViewPage: TTabSheet;
    OrderPage: TTabSheet;
	procedure FormCreate(Sender: TObject);
	procedure FormDestroy(Sender: TObject);
	procedure FormResize(Sender: TObject);
  private
	{ Private declarations }
  public
	OrdersList : TOrdersList;
	procedure ShowMessage(Str : String);
	procedure MakeOrder(GUID : string);
  end;

var
  MainForm: TMainForm;

implementation
Uses System.Contnrs;

{$R *.dfm}

procedure TMainForm.FormCreate(Sender: TObject);
begin
	OrdersList := TOrdersList.Create;
end;

procedure TMainForm.FormDestroy(Sender: TObject);
begin
	OrdersList.Free;
end;

procedure TMainForm.FormResize(Sender: TObject);
begin
	FOrdersView.SetElementSize;
end;

procedure TMainForm.MakeOrder(GUID: string);
begin
end;

procedure TMainForm.ShowMessage(Str: String);
begin
	while InfoBox.Count > 250 do begin
		InfoBox.Items.Delete(0);
	end;
	InfoBox.Items.Insert(0,TimeToStr(Now)+' '+Str);
end;

end.
